<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="../../js/vue.js"></script>
    <style>
        [v-cloak] {
            display: none;
        }
    </style>
</head>

<body>

    <dvi id="app">
        <!-- <li v-for="item in list">{{item}}</li>
        <li v-for="(item, index) in list">{{item}}---{{index}}</li>
        <li v-for="(item, index) in list" v-bind:key="index">{{item}}---{{index}}</li>
        <li v-for="(item, index) in color" v-bind:key="item.name">{{item.name}}---{{item.value}}---{{index}}</li> -->


        <!--  -->
        <!-- <li v-for="item in obj">{{item}}</li> -->
        <!-- item:表示遍历对象元素的值，key：表示遍历对象元素的键，index：表示对象的第几个元素 -->
        <!-- <li v-for="(item, key, index) in obj">{{item}}--{{key}}--{{index}}</li> -->
        <li v-for="(item, key) in obj">{{item}}--{{key}}</li> 
        <li v-for="(item, key, index) in obj" :key="key">{{item}}--{{key}}--{{index}}</li>

        
        <div class="color" v-for="item in 2">
            <span>{{ item }}</li>
        </div>

        <template v-for="item in 3">
            <span>{{ item }}</li>
        </template>

        <hr>
        <li v-if="item=='red'" v-for="(item, key, value) in obj">{{item}}--{{key}}--{{value}}</li>{{value}}</li>
    </dvi>

    <script>
        var vm = new Vue({
            el: "#app",
            data: {
                list: ["red", "blue", "black", { name: "wwj", age: 23 }],
                color:[{name:"red",value:"#ddeedd"},{name:"blue", value: "#cccc"}],
                obj:{
                    name:"red",
                    age: 999,
                    id: 1
                }
            },
            methods: {
                handle1() {

                },
            }
        })
    </script>
</body>

</html>